﻿using Infragistics.Controls.Editors;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Input;

namespace VNet.VisiSuite.Controls
{
    public class XamNumericInputEx : XamNumericInput
    {
        public XamNumericInputEx()
            : base()
        {
            this.GotFocus += XamNumericInput_GotFocus;
            this.GotMouseCapture += XamNumericInput_GotMouseCapture;
            SelectAllBehavior = MaskSelectAllBehavior.SelectAllCharacters;
        }

        private void XamNumericInput_GotFocus(object sender, RoutedEventArgs e)
        {
            ((XamNumericInput)sender).SelectAll();

        }

        private void XamNumericInput_GotMouseCapture(object sender, MouseEventArgs e)
        {
            ((XamNumericInput)sender).SelectAll();
        }
    }
}
